<?php
    $username = $_POST['username'];
    $password = $_POST['password'];

    if ($username == 'admin' && $password == 'test123') {
        // redirect to return page with auth cookie
        session_start();

        // set user name into session
        $_SESSION['username'] = $username;
        header("Location: /php/hello.php");
    } else {
        header('Location: /login_form.html');
    }
?>
    
